<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->systemName;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
</head>

<body>
	<div id="main">
		<div id="navigation">当前位置：<span id="focus">导入商家提供的订单数据</span></div>
		<div id="body">
			<div id="edit">
				<form action="" method="post" enctype="multipart/form-data" name="editForm" id="editForm">
					<table class="table">
						<tr>
						  <td>文件类型：</td>
						  <td><input name="fileType" type="radio" id="radio" value="excel" checked="checked" />
						    EXCEL</td>
					  </tr>
						<tr>
							<td width="20%">选择文件：</td>
							<td><input type="file" name="uploadfile" id="uploadfile" />
							  <a href="<?php echo $this->demoUrl;?>" target="_blank">查看格式</a>（为了快速导入，请每次导入数据小于一千条）</td>
						</tr>
						<tr>
							<td width="20%">&nbsp;</td>
							<td><input type="submit" name="button" id="button" value="提交" class="button"/></td>
						</tr>
					</table>
			  </form>
		  </div>
		</div>
	</div>
<script language="javascript">
$("#boxForm").submit(function(){
	if ($.trim($("#Name").val()) == '') {
		alert('请输入角色名称。');
		$("#Name").focus();
		return false;
	}
	var type = null;
	$(".type").each(function(){
		if ($(this).attr('type') == 'radio' && $(this).attr('checked') == true) {
			type = this.value;
		}
	});
	if (type == 2 && $.trim($("#PartnerCode").val()) == '') {
		alert('请输选择一个公司。');
		$("#PartnerCode").focus();
		return false;
	}
});
</script>

<script language="javascript">
$(".type").click(function(){setType();});
function setType()
{
	var type = null;
	$(".type").each(function(){
		if ($(this).attr('type') == 'radio' && $(this).attr('checked') == true) {
			type = this.value;
		}
	});
	if (type == 1) {
		$("#partnerBlock").css('display', 'none');
	} else {
		$("#partnerBlock").css('display', '');
	}
}
$(".type").click(function(){setType();});
setType();
</script>
</body>
</html>